<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <title>Document</title>
    <style>
        /* *{
            margin: 0 auto;
            padding: 0;
        } */
        .box{
            border: 1px solid gray;
           background-color: #ddd;
        }
        .red{
            color: white;
            background-color: red;
        }
        
    </style>
</head>
<body>
    <script src="./js/jquery.min.js"></script>

    <div class="container">
        <div class="row box">
            <div class="col-md-2">商品介绍</div>
            <div class="col-md-2">规格与包装</div>
            <div class="col-md-2">售后保障</div>
            <div class="col-md-2">商品评价（50000）</div>
            <div class="col-md-2">手机社区</div>
        </div>
        <div>商品介绍----------</div>
        <div>规格与包装----------</div>
        <div>售后保障----------</div>
        <div>商品评价（50000）----------</div>
        <div>手机社区----------</div>
    </div>

<script>
    $(function(){
       
        $('.box div').mouseover(function () {

            $(this).addClass('red');

        })
        $('.box div').mouseout(function () {

            $(this).removeClass('red');

        })

        $('.box').siblings().hide();
        $('.box div').siblings().click(function () {

            $(this).parent('div').siblings().hide();
            console.log(11);
            var index = $(this).index();
            $('.container > div').siblings().eq(index).show();
            
        })
        
    })
</script>
</body>
</html>